#{extends 'noTab.html' /} #{set title:'Topic Requests' /}
<h1 class="viewTitle">Topic Requests</h1>
<div class="viewContent">
#{if isAllowed}
#{list items:requestedTopics, as:'request'}
#{if !request.isDraft}

#{form @Browse.promoteRequest(request.id)}

<div class="topic">

	<h2 class="topic-name">Topic name:<input type="text" name="name" value="${request.name}"/> </h2>
	<div class="topic-meta-data">
	<div class="formEntry">
		<div class="formLabel">
		<label class="topic-description"> Description:
		</label>
		</div>
		<textarea name="desc"rows="10" cols="100">${request.description}</textarea>
		<div class="clear"></div>
		</div>
		<div class="formEntry">
		<div class="formLabel">
		<label class = "topic-date">
		 Started at: ${request.date} <br>
		 </label>
		 </div>
		 <div class="clear"></div>
		 </div>
		 <div class="formEntry">
		 <div class="formLabel">
		<label class = "topic-creator">
		 Created by: ${request.creator.name} <br>
		 </label>
		 </div>
		 <div class="clear"></div>
		 </div>
	</div>
</div>

<div class="formEntry">
<input type="submit" value="approve">
</div>
<br />

#{/form} #{form @Browse.disapproveRequest(request.id)}
<div class="formEntry">
<input type="submit" value="disapprove">
</div>
<br />
#{/form}
#{/if}
#{/list}
#{/if}
</div>